package sourceCode;

import java.awt.geom.Point2D;

import java.util.ArrayList;

public abstract class ConteneurBagages extends Noeud {

    ArrayList<Bagage> listBagages;

    public ConteneurBagages(int _id, Point2D.Double _point) {
        super(_id, _point);
        listBagages = new ArrayList<Bagage>();
    }


    protected Boolean chargerBagage(Bagage bagage) {
        bagage.setConteneur(this);
        return this.listBagages.add(bagage);
    }

    protected Boolean dechargerBagage(Bagage bagage) {
        return this.listBagages.remove(bagage);
    }

    public ArrayList<Bagage> getListBagages() {
        return listBagages;
    }
}
